import sys
print(sys.path)
from module_B.B import some_function_b  
  
def some_function_sub_a():  
    print("Hello from sub module_a!")  
  
def main():  
    some_function_sub_a()  
    some_function_b()  
    print("Run with __name__ is __main__")
    print(sys.path)
  

if __name__ == "__main__":  
    main()
    
    

""" 
python -m module_A.sub_module_A.subA
Hello from sub module_a!
Hello from module_b!
"""

""" 
python -m module_A/sub_module_A/subA
/opt/anaconda3/bin/python: No module named module_A/sub_module_A/subA
"""

""" 
python module_A/sub_module_A/subA.py
in this way you won't run as __main__ 
and also no project root path in sys.path
"""

""" 
python -m sub_module_A.subA
ModuleNotFoundError: No module named 'module_B'
"""
